﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using com.dz.ct.business;
using WeifenLuo.WinFormsUI.Docking;

namespace com.dz.ct.ui
{
    public partial class FrmOutPut : DockContent
    {
        public FrmOutPut()
        {
            InitializeComponent();
        }

        public FrmOutPut(FrmMain i_parent)
        {
            Control.CheckForIllegalCrossThreadCalls = false;
            i_parent.SendMsg += new SendMsgEventHandler(DisplayMsg);
            InitializeComponent();
        }


        /// <summary>
        /// 显示处理回送消息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DisplayMsg(object sender, SendMsgEventArgs e)
        {
            if (e.MsgType == MsgType.Total)
            {

                txtTotalInfo.AppendText(e.Msg);
                txtTotalInfo.AppendText("\r\n");
                txtTotalInfo.AppendText("\r\n");
            }
            else
            {
                txtDetailInfo.AppendText(e.Msg);
                txtDetailInfo.AppendText("\r\n");
                txtDetailInfo.AppendText("\r\n");
            }


        }
    }
}
